package com.yao.util;

/**
 * 随机4位数
 *
 * @author 妖悲冥
 * @date 2021/5/23 0023   -    15:06
 */
public class RandomFour {
    public static String random() {
        int[] ran = new int[4];
        for (int i = 0; i < ran.length; i++) {
            ran[i] = (int) (Math.random() * 9);
        }
        return ran[0] + "" + ran[1] + "" + ran[2] + "" + ran[3];
    }
}
